<{includeq file="db:album_header.html"}>
<div class="xo-album">
    <div class="xo-album-info ui-tabs ui-widget ui-widget-content ui-corner-all">
        <div class="xo-album-cover"><div><{$album.cover}></div></div>
        <div><a href="album.php?albumId=<{$album.album_id}>"><strong><{$album.album_name}></strong></a> <small>(<{$album.album_total}>)</small></div>
        <{if $album.album_desc}><div><{$album.album_desc}></div><{/if}>
        <div><small><{$album.album_dateline}></small> </div>
        <div><small><{$smarty.const._ALBUM_CATEGORY}> <a href="category.php?catId=<{$album.cat_id}>"><{$album.cat_name}></a></small></div>
        <div>
            <a href="ajax.php?op=album&amp;ac=edit&amp;albumId=<{$album.album_id}>" class="dialog">修改</a> | 
            <a href="ajax.php?op=album&amp;ac=delete&amp;albumId=<{$album.album_id}>" class="dialog">删除</a>
        </div>
        <div class="xo-album-clearfix"></div>
        <div class="userbox">
            <ul class="li-menu-nav">
                <{if $album}>
                <li>
                    <a href="upload.php?albumId=<{$album.album_id}>">上传图片</a>
                </li>
                <{/if}>
                <{if $my_albums}>
                <li>
                    <a href="category.php?uid=<{$xoops_userid}>">我的相册</a>
                    <dl class=" ui-tabs ui-widget ui-widget-content ui-corner-all">
                        <{foreachq item=item from=$my_albums}>
                        <dd><a href="album.php?albumId=<{$item.album_id}>"><{$item.album_name}></a> <small>(<{$item.album_total}>)</small></dd>
                        <{/foreach}>
                    </dl>
                </li>
                <{/if}>
                <li><a href="ajax.php?op=album&amp;ac=create" class="dialog">创建相册</a></li>
            </ul>
        </div>
    </div>
    
    <div class="xo-album-box">
        <div id="tabs">
			<ul>
				<li><a href="#tabs-1">批量上传</a></li>
				<li><a href="#tabs-2">传统上传</a></li>
			</ul>
			<div id="tabs-1">
			     <div class="ui-widget">
        			<div class="ui-state-error ui-corner-all" style=" padding: 5px 10px; line-height: 18px;"> 
        				<p><strong>提示:</strong>  每个图片大小不能超过2M,每次最多可以传60张图片。</p>
        			</div>
        		</div>
        		<div id="swfu_select_files" class="swfu-select-file" style="padding: 5px 10px; ">
                    <span id="spanButtonPlaceholder"></span>
                    <a href="javascript:view(0);">选择要上传的文件</a>
                </div>
                
                <div id="swfu_upload_list" class="swfu-upload-list">
                    <ul id="swfu_upload_list_box" class="swfu-upload-list-box">
                        <li id="swfu_upload_box_head" class="swfu-list-box-head">没有选择何任何文件!</li>
                    </ul>
                    <button id="BrowseUpload" type="button" onclick="javascript:swfu.startUpload(); ">开始上传</button>
                </div>
			</div>
			<div id="tabs-2">
			
			</div>
		</div>
        
    </div>
    <div class="xo-album-clearfix"></div>
</div>

<script type="text/javascript">
	var swfu 
    window.onload = function() {
		swfu = new SWFUpload({
			upload_url :                               "<{$swfuploads.upload_url}>", 
            post_params: { 
                "albumId": "<{$swfuploads.post_params.albumId}>", 
                "uid": "<{$swfuploads.post_params.uid}>",
                "sign": "<{$swfuploads.post_params.sign}>",
                "PHPSESSID": "<{$swfuploads.post_params.PHPSESSID}>"
            },
    	    flash_url :                                    "<{$swfuploads.flash_url}>", 
    	    file_size_limit :                             "<{$swfuploads.file_size_limit}>", 
    	    file_types:                                    "<{$swfuploads.file_types}>", 
    	    file_upload_limit:                         "<{$swfuploads.file_upload_limit}>", 
    	    file_types_description:                 "<{$swfuploads.file_types_description}>", 

            file_dialog_complete_handler :      fileSelectedEventHandler,
            file_queued_handler:                     fileQueuedEventHandler,
            upload_start_handler :                  uploadStartEventHandler, 
            upload_progress_handler :            uploadProgressEventHandler,
            upload_complete_handler :            uploadCompleteEventHandler,
            upload_success_handler :              uploadSuccessEventHandler ,
            upload_error_handler :                  uploadErrorEventHandler,

            // Button Settings
            button_text : "",
            button_text_style: "",
            button_image_url : "<{$swfuploads.button_image_url}>",
            button_placeholder_id : "spanButtonPlaceholder",
            button_width: 237,
            button_height: 49,
            button_window_mode: SWFUpload.WINDOW_MODE.TRANSPARENT,
            button_cursor: SWFUpload.CURSOR.HAND, 

            debug : false
		});
	};
</script>